package com.github.sbb.sherry.primitives.rules;

import com.github.sbb.sherry.primitives.api.Fact;
import com.github.sbb.sherry.primitives.api.Facts;
import com.github.sbb.sherry.primitives.api.Fetcher;
import com.github.sbb.sherry.primitives.core.MapFact;
import com.github.sbb.sherry.primitives.exception.FetcherException;
import java.util.Map;

public class SimpleFetcher implements Fetcher {

  @Override
  public String name() {
    return "sdfasdfasdf";
  }

  @Override
  public byte getDefaultFetchMethod() {
    return 0;
  }

  @Override
  public Fact emit(Map<String, Object> params) throws FetcherException {
    return new MapFact(params);
  }

  /**
   * 多次查询
   *
   * @param params 查询条件
   * @return record列表
   */
  @Override
  public Facts batchEmit(Map<String, Object> params) throws FetcherException {
    return null;
  }
}
